package com.androgl.math;

public class Vector2D {
	
	public float x,y;
	
	public Vector2D() {
		x = y = 0.0f;
	}
	
	public Vector2D(float newX,float newY) {
		x = newX;
		y = newY;
	}
	
	public void add(Vector2D v) {
		x += v.x;
		y += v.y;
	}
	
	public void mul(float fValue) {
		x *= fValue;
		y *= fValue;
	}
	
	public float dot(Vector2D v) {
		return (x*v.x+y*v.y);
	}
	
	public float cross(Vector2D v) {
		return (x*v.y-y*v.x);
	}

}
